package cn.second;

public class Book {
    private int bookId;
    private String bookName;
    private String press;
    private  int price;

    public Book(){

    }

    public Book(int bookId, String bookName, String press, int price) {
         this.setBookId(bookId);
         this.setBookName(bookName);
         this.setPress(press);
         this.setPrice(price);
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getPress() {
        return press;
    }

    public void setPress(String press) {
        this.press = press;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public  void report(){
        String meg=String.format("图书编号%d,图书名称%s,出版社%s,定价%d",bookId,bookName,press,price);
        System.out.println(meg);
    }
}
